<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
	</body>
	<script type="text/javascript">
//	老铁做一个简单的封装,培养一下思想,以后直接用大牛的就行了,肯定比我们自己写的香
		function ajax(options){
			
			var xhr = new XMLHttpRequest();
			xhr.onreadystatechange=function(){
				
				if(xhr.readyState==4){
					var data = JSON.parse(xhr.responseText)
					console.log(data)
				}
			}
			
			xhr.open(options.type,options.url)
			xhr.send('')
		}
		var options = {
			type:"get",
			url:"data/caijing.json",
		}
		
		ajax(options)
		
	</script>
</html>
